-
-
Notifications
You must be signed in to change notification settings - Fork 345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support building on macOS #4320
Support building on macOS #4320
Conversation
This is ready for review, I'd love it if someone could confirm this doesn't break builds for them! |
I've confirmed that this doesn't affect building on Linux on account of the CI still working: https://github.com/doinkythederp/CKAN/actions/runs/13471224444 |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Resolved in |
This comment was marked as resolved.
This comment was marked as resolved.
Oops! I think when I applied the template for Cake Frosting it must have overwritten that. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for working on this! 🚀
This pull request refactors the build script to work properly on macOS.
The problem
The current Cake build script doesn't work on ARM Macs because the Cake Git APIs are only complied for x86/x86_64, not arm64. There are also some places that incorrectly handle differences between macOS and Linux.
The solution
Cake Frosting is a newer option for setting up a Cake project which drops the need for a
build.cake
DSL and just gives you a normalcsproj
to write your build logic in. It has the same user-facing API as Cake without the aforementioned issues when building on ARM. It also has better IntelliSense in multi-platform IDEs like JetBrains Rider.I re-organized the build script to use the Cake Frosting style and improved the logic for finding tool paths on macOS.
I also added a JetBrains Rider config which improves the development experience on macOS because it allows developers to open the Visual Studio solution without being on Windows.
Structural changes
I moved the free-standing functions like
GetVersion
, etc. into the newBuildContext
class so they could be accessed from any task. I also refactored theMakeIn
function into aMakeTask
class which is more ergonomic when using Cake Frosting. I also put many of the top-level variables into aBuildPaths
class.TODO
Currently they aren't passing because I have Dotnet 9.0 installed while CKAN targets Dotnet 8.0, so they're refusing to run.